{extend name="../back" /}
{block name="main"}
<h6 class="fw-bold mb-3">{:lang('admin/route/index')}</h6>
<form name="adminRouteIndex" action="{:xfUrl('admin/route/save')}" method="post">
<table class="table table-striped table-bordered table-hover" id="route">
  <thead>
    <tr>
      <th>删除</th>
      <th>路由表达式</th>
      <th>路由真实地址</th>   
    </tr>
  </thead>
  <tbody>
    {volist name="list" id="item"}
    <tr class="align-middle">
      <td class="text-center" style="width: 60px;"><input class="checkDelete" name="delete[]" type="checkbox" value="{$key}"></td>
      <td><input class="form-control form-control-sm text-muted" name="url[]" type="text" autocomplete="off" value="{$item.0}"></td>
      <td><input class="form-control form-control-sm text-muted" name="path[]" type="text" autocomplete="off" value="{$item.1}"></td>
    </tr>
    {/volist}
    <tr class="align-middle d-none" id="plus-tr">
      <td class="text-center"><i class="bi-trash text-muted"></i></td>
      <td><input class="form-control form-control-sm text-muted" name="url[]" type="text" autocomplete="off" disabled required></td>
      <td><input class="form-control form-control-sm text-muted" name="path[]" type="text" autocomplete="off" disabled required></td>
    </tr>
 </tbody>
 <tfoot>
  <tr>
    <td class="text-center"><input id="checkAll" type="checkbox"></td>
    <td colspan="3">
      <button class="btn btn-secondary btn-sm" type="button" id="plus" data-target="#plus-tr">新增</button>
      <button class="btn btn-dark btn-sm" type="submit">提交</button>
    </td> 
  </tr>
 </tfoot>
</table>
</form>
{/block}